package com.baizhi.shane.shane.mapper;

import com.baizhi.shane.shane.dto.*;
import com.baizhi.shane.shane.entity.ShaneAnswer;
import com.baizhi.shane.shane.vo.CountVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author wbz12
* @description 针对表【shane_answer(啥呢回答表)】的数据库操作Mapper
* @createDate 2023-07-25 22:33:37
* @Entity com.baizhi.shane.shane.entity.ShaneAnswer
*/
public interface ShaneAnswerMapper extends BaseMapper<ShaneAnswer> {

    List<PageAnswerOutDTO> pageByContent(PageInDTO pageInDTO);

    List<CountVO> getAnswerLikeCountByAnswerIdList(@Param("answerIdList") List<Long> answerIdList, @Param("userId") Long userId);

    List<CountVO> getAnswerAgainstCountByAnswerIdList(@Param("answerIdList") List<Long> answerIdList, @Param("userId") Long userId);

    List<CountVO> getAnswerCollectCountByAnswerIdList(@Param("answerIdList") List<Long> answerIdList, @Param("userId") Long userId);

    List<CountVO> getAnswerCommentCountByAnswerIdList(@Param("answerIdList") List<Long> answerIdList, @Param("userId") Long userId);

    GetOneAnswerOutDTO getOneAnswerById(Long answerId);

    List<AnswerMyPostedOutDTO> myPosted(Long userId);

    List<AnswerMyPostedOutDTO> myCollected(Long userId);

    List<AnswerLabelOutDTO> getAnswerLabelListByAnswerIdList(List<Long> answerIdList);

    Integer countAndPageByContent(String content);
}




